<html>
<head><meta charset="utf-8"><title>design meeting 2021-04-21: extern “wasm&quot; · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html">design meeting 2021-04-21: extern “wasm&quot;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234897605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234897605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234897605">(Apr 16 2021 at 18:07)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span> and <span class="user-mention" data-user-id="239881">@Josh Triplett</span> , while talking to alex about preparing a doc for next week’s design meeting, I noticed there wasn’t a calendar event for it. I don’t have permissions to create an event on the lang team calendar; otherwise I’d just do it by cloning the “dismantle &amp;Atomic bomb” meeting.</p>



<a name="234905517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234905517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234905517">(Apr 16 2021 at 19:07)</a>:</h4>
<p>Ah, thanks for reminding me</p>



<a name="234905533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234905533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234905533">(Apr 16 2021 at 19:07)</a>:</h4>
<p>I was going to create that today!</p>



<a name="234905534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234905534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234905534">(Apr 16 2021 at 19:07)</a>:</h4>
<p>let me go do that</p>



<a name="234905757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234905757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234905757">(Apr 16 2021 at 19:09)</a>:</h4>
<p>but I also had some questions for <span class="user-mention" data-user-id="116015">@Alex Crichton</span> on this topic...</p>



<a name="234905766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234905766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234905766">(Apr 16 2021 at 19:09)</a>:</h4>
<p>...trying to remember what they were</p>



<a name="234907792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234907792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234907792">(Apr 16 2021 at 19:25)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="116122">@simulacrum</span> if you're around could you merge <a href="https://github.com/rust-lang/blog.rust-lang.org/pull/818">https://github.com/rust-lang/blog.rust-lang.org/pull/818</a> ?</p>



<a name="234909807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234909807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234909807">(Apr 16 2021 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> once nits are fixed, happy to merge. feel free to ping me.</p>



<a name="234925501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/234925501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#234925501">(Apr 16 2021 at 21:38)</a>:</h4>
<p>I've written up some initial notes ahead of time for this at <a href="https://hackmd.io/Xrgc68kDRtmNnG8g8CzA6Q">https://hackmd.io/Xrgc68kDRtmNnG8g8CzA6Q</a>, but if folks have other questions please let me know and I can fill in more info!</p>



<a name="235545974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235545974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235545974">(Apr 21 2021 at 17:02)</a>:</h4>
<p>am I connected to the correct zoom session? <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ?</p>



<a name="235546013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235546013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235546013">(Apr 21 2021 at 17:02)</a>:</h4>
<p>I'm wondering the same thing.</p>



<a name="235554765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554765">(Apr 21 2021 at 18:01)</a>:</h4>
<p>FWIW I would personally be nowhere near comfortable stabilizing anything related to <code>extern "wasm"</code> just yet, I would personally at least want a lot more input from C and the expected migration paths there</p>



<a name="235554801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554801">(Apr 21 2021 at 18:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116015">Alex Crichton</span> <a href="#narrow/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22/near/235554765">said</a>:</p>
<blockquote>
<p>FWIW I would personally be nowhere near comfortable stabilizing anything related to <code>extern "wasm"</code> just yet, I would personally at least want a lot more input from C and the expected migration paths there</p>
</blockquote>
<p>That's good to know.</p>



<a name="235554827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554827">(Apr 21 2021 at 18:01)</a>:</h4>
<p>If you're intending this to be nightly only for quite some time, that's an important detail.</p>



<a name="235554832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554832">(Apr 21 2021 at 18:02)</a>:</h4>
<p>I think the story for how C intends to migrate ABI changes will affect this a lot, whether we want it at all or how we expose it</p>



<a name="235554901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554901">(Apr 21 2021 at 18:02)</a>:</h4>
<p>Yeah. I wonder if the LLVM transition is going to end up being as painful as C++ ABI transitions have been in the past.</p>



<a name="235554925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554925">(Apr 21 2021 at 18:02)</a>:</h4>
<p>I do really want to get multi-value returns stable on Rust sooner rather than later, but you can sort of do that with <code>-Ctarget-feature=+multivalue</code> today</p>



<a name="235554953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554953">(Apr 21 2021 at 18:02)</a>:</h4>
<p>so I think there's less pressure</p>



<a name="235554977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235554977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235554977">(Apr 21 2021 at 18:02)</a>:</h4>
<p>my prediction is it's going to be just as painful</p>



<a name="235555035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235555035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235555035">(Apr 21 2021 at 18:03)</a>:</h4>
<p>that there will be a flag "this object uses this abi" and the world blows up if anything disagrees</p>



<a name="235555242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235555242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235555242">(Apr 21 2021 at 18:04)</a>:</h4>
<p>At least there's a flag.</p>



<a name="235555261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235555261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235555261">(Apr 21 2021 at 18:04)</a>:</h4>
<p>With C++, some of the transitions didn't even have <em>that</em>.</p>



<a name="235555327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235555327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235555327">(Apr 21 2021 at 18:05)</a>:</h4>
<p>In the context of ABI, I'd rather a slightly more painful transition than a lingering one.</p>



<a name="235560839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235560839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235560839">(Apr 21 2021 at 18:42)</a>:</h4>
<p>I've posted a comment for other C folks to take a look at -- <a href="https://github.com/WebAssembly/tool-conventions/issues/54#issuecomment-824274703">https://github.com/WebAssembly/tool-conventions/issues/54#issuecomment-824274703</a> -- and doing some more thinking I think that <code>extern "wasm"</code> may not end up needing a definition in Rust. The theory, I believe, is that C will have multiple versions of the wasm C ABI. Currently we're at "v1" and presumably "v2" will be the one that incorporates multiple return values. Given this situation what we can do in Rust is something like:</p>
<ul>
<li>For each ABI version defined for C, add a <code>extern "wasm-v2"</code> ABI</li>
<li>Automatically map <code>extern "C"</code> to whatever the default ABI is at the time (e.g. today it's <code>"v1"</code>)</li>
</ul>
<p>And... that's it. That way Rust isn't defining anything itself. All types are supported at all time just like the C ABI, and if wasm ever adds new features that changes the ABI then <em>C</em> would add another version of the ABI and we would then match that in Rust. This I think gives freedom to evolve over time while still having a generally usable ABI today.</p>
<p>What this would mean is that I would add <code>extern "wasm-v1"</code> as an alias to <code>extern "C"</code> today. I would then rename <code>extern "wasm"</code> to <code>extern "wasm-v2"</code>. Stabilization would then be gated on there actually being a C ABI v2 agreed upon by wasm folks (external from Rust) and then a stabilization for the naming scheme and ABI scheme in Rust (this is for Rust folks).</p>



<a name="235562018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235562018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235562018">(Apr 21 2021 at 18:51)</a>:</h4>
<p>For thread support and simd you already need to compile everything with those feature flags enabled. At least in case of threads lld will actively refuse linking as far as I know and in case of simd rust changes the abi for simd types depending on of simd is enabled or not. Unlike for other archs. The most sensible thing IMHO would be to just make the abi conditional on multivalue being enabled or not.</p>



<a name="235562998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235562998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235562998">(Apr 21 2021 at 18:58)</a>:</h4>
<p>We talked about this in the meeting but I would personally prefer to avoid doing that. That doesn't work for precompiled binaries such as libstd or wasi-libc which we ship via rustup, and I don't think it's necessary to create whole new targets for just getting a matching C ABI. A whole new target isn't needed for simd either because it can be used on a function-local basis. I suspect a whole new target is needed for threads, though, because it has ramifications on the standard library and implementations of primitives there</p>



<a name="235563677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235563677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235563677">(Apr 21 2021 at 19:02)</a>:</h4>
<p>The versioned approach sounds promising, assuming there's a linear progression of versions.</p>



<a name="235686936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235686936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235686936">(Apr 22 2021 at 14:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116015">Alex Crichton</span> <a href="#narrow/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22/near/235562998">said</a>:</p>
<blockquote>
<p>[...] A whole new target isn't needed for simd either because it can be used on a function-local basis. [...]</p>
</blockquote>
<p>For simd that would require forcing all simd arguments to be passed on the stack like for other archs. <a href="https://github.com/rust-lang/rust/blob/25c15cdbe070f49d708f34750df2632e38bd4846/compiler/rustc_middle/src/ty/layout.rs#L2905-L2930">https://github.com/rust-lang/rust/blob/25c15cdbe070f49d708f34750df2632e38bd4846/compiler/rustc_middle/src/ty/layout.rs#L2905-L2930</a></p>



<a name="235694733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/design%20meeting%202021-04-21%3A%20extern%20%E2%80%9Cwasm%22/near/235694733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/design.20meeting.202021-04-21.3A.20extern.20.E2.80.9Cwasm.22.html#235694733">(Apr 22 2021 at 15:06)</a>:</h4>
<p>No, that's not true. WebAssembly modules are unlike native executables where native executables work so long as you don't execute code your cpu doesn't support. WebAssembly modules are all-or-nothing where nothing works if something doesn't work.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>